package com.alibaba.algo.apiimpl.feign;

import com.alibaba.algo.Application;
import com.alibaba.algo.cooperation.common.BaseResult;
import com.alibaba.algo.cooperation.feign.vo.req.SelectOrgUserReqVO;
import com.alibaba.algo.cooperation.feign.vo.res.OrgUserInfoResVO;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

/**
 * @author : WangZhiPan
 * @date : 2021/10/11 9:32
 */
@SpringBootTest(classes = Application.class)
@RunWith(SpringRunner.class)
@Slf4j
public class OrgFeignServiceImplTest {

    @Autowired
    private OrgFeignServiceImpl orgFeignService;


    @Test
    public void testGetUsersByAppCodeAndOrg() {

        SelectOrgUserReqVO vo = new SelectOrgUserReqVO();
        vo.setAppCode("MOM");
//        vo.setOrgId(67L);
//        vo.setOrgCode("1c6715b5-50db-424a-a6bf-8136b42a3eec");
//        vo.setSearchKey("张");
        BaseResult<List<OrgUserInfoResVO>> resp = orgFeignService.qryUserListByOrg(vo);
        log.info("resp=={}", JSON.toJSONString(resp));
    }
}
